function SettingService() { }

SettingService.prototype = {
    
    setLocationAllow: function(allow) {
        localStorage.setItem("locationallow", allow);
    },
    
    getLocationAllow: function() {
        var allow = localStorage.getItem("locationallow");
        if (allow == null) {
            allow = "拒否";
        }
        return allow;
    },
    
    /**
     * Not using for SettingController because of optimization,
     * please using this when you wanna a boolean value of setting location.
     */
    isLocationAllow: function() {
        var allow = localStorage.getItem("locationallow");
        if (allow == null) {
            allow = false;
        } else {
            allow = (allow !== "拒否");
        }
        return allow;
    }
};